package pl.koziolekweb.loggerservice;

public final class CommonsAdapter implements LoggerFactoryAdapter<org.apache.commons.logging.Log> {

	public org.apache.commons.logging.Log getLogger(Object... factoryArguments) {
		org.apache.commons.logging.Log logger = null;
		if (factoryArguments.length <= 0)
			logger = org.apache.commons.logging.LogFactory.getLog(Object.class);
		if (factoryArguments[0] instanceof Class)
			logger = org.apache.commons.logging.LogFactory.getLog((Class<?>) factoryArguments[0]);
		if (factoryArguments[0] instanceof String)
			logger = org.apache.commons.logging.LogFactory.getLog(factoryArguments[0].toString());
		return logger;
	}

}